package routers

import (
	"gin-project-01/gin-step02/gin09-model/controllers/index"
	"gin-project-01/gin-step02/gin09-model/middlewares"
	"github.com/gin-gonic/gin"
)

func IndexRouters(r *gin.Engine) {
	//路由分组中间件使用方式一
	routers := r.Group("/index", middlewares.SaveAccessLog)

	{

		//使用自定义控制器
		routers.GET("/", index.IndexController{}.Index)

	}
}
